package org.clever.arkdemo.video;

import com.alibaba.fastjson.JSON;
import org.clever.arkdemo.video.domain.dto.TencentVodUploadSignParam;
import org.clever.arkdemo.video.domain.vo.VideoUploadSign;
import org.clever.arkdemo.video.utils.TencentVodSignUtils;

public class VideoSignDemo {
    public static void main(String[] args) {
        String secretId = "AKIDqWx97ygAQSFo8D3g7KI1Ww85rOhlbCYg";
        String secretKey = "vb2EF3c1BAvTrAG8lCONDnBMJ1Vlna8S";
        String subAppId = "1258399249";
        TencentVodUploadSignParam param = new TencentVodUploadSignParam();
        param.setSecretId(secretId);
        param.setSecretKey(secretKey);
        param.setVodSubAppId(subAppId);
        // 任务流, 需要自己后台配置. 上传后进入一些视频处理的流程.
        param.setProcedure("H264-封面-不审核");
        // 透出的自定义参数, 随便写. 在procedure任务流完成后回调时返回.
        param.setSessionContext("{'test':true}");

        VideoUploadSign videoUploadSign = TencentVodSignUtils.getVideoUploadSign(param);

        System.out.println(JSON.toJSONString(videoUploadSign));

    }
}
